package com.atgm.mall.gmmailorder.feign;

import com.atgm.common.utils.R;
import com.atgm.mall.gmmailorder.feign.fallback.CartFeignFallbackService;
import com.atgm.mall.gmmailorder.feign.vo.CartRemoveVo;
import com.atgm.mall.gmmailorder.vo.OrderItemVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "gm-mall-cart", qualifier = "cartFeignService", fallback = CartFeignFallbackService.class)
public interface CartFeignService {

    @GetMapping(value = "/gmmallcart/cart/currentUserCartItems")
    List<OrderItemVo> getCurrentCartItems();

    @PostMapping("/gmmallcart/gameshopping/removeCart")
    R removeCart(@RequestBody CartRemoveVo cartRemoveVo);

}
